package com.ruoyi.system.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.domain.OvertimeApplications;
/**
 * 加班Mapper接口
 *
 * @author ruoyi
 * @date 2025-03-30
 */
public interface OvertimeApplicationsMapper
{

    /**
     * 获取本月加班天数
     */
    Integer selectMonthOvertimeDays(Map<String, Object> params);
    /**
     * 获取本月加班总时长
     */
    Double selectMonthOvertimeHours(Map<String, Object> params);
    /**
     * 查询加班
     *
     * @param id 加班主键
     * @return 加班
     */
    public OvertimeApplications selectOvertimeApplicationsById(Long id);

    /**
     * 查询加班列表
     *
     * @param overtimeApplications 加班
     * @return 加班集合
     */
    public List<OvertimeApplications> selectOvertimeApplicationsList(OvertimeApplications overtimeApplications);

    /**
     * 新增加班
     *
     * @param overtimeApplications 加班
     * @return 结果
     */
    public int insertOvertimeApplications(OvertimeApplications overtimeApplications);

    /**
     * 修改加班
     *
     * @param overtimeApplications 加班
     * @return 结果
     */
    public int updateOvertimeApplications(OvertimeApplications overtimeApplications);

    /**
     * 删除加班
     *
     * @param id 加班主键
     * @return 结果
     */
    public int deleteOvertimeApplicationsById(Long id);

    /**
     * 批量删除加班
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOvertimeApplicationsByIds(Long[] ids);

    // 新增接口方法
    List<SysUser> selectDeptManagersByUserId(
            @Param("userId") Long userId,
            @Param("roleId") Long roleId
    );

    List<OvertimeApplications> selectOvertimeApplicationsListByRole(
            @Param("overtimeApplications") OvertimeApplications overtimeApplications,
            @Param("currentUserId") Long currentUserId
    );

}
